import allVariableJs from "./allVariable";
cc.Class({
    extends: cc.Component,

    properties: {
        giftFrameArray:[cc.Vec2],
    },




    // onLoad () {},

    start () {

    },


    init(mousesNum,type){

        this.node.active=true

        this.node.getChildByName("moneyNumber").getComponent(cc.Label).string="+"+allVariableJs.addMoneyNum/100
      
        switch(type){
            case 0:
            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;

            case 1:

            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;
            
            case 2:
            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;
            
            case 3:
            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;

            case 4:
            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;

            case 5:
            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;

            case 6:
            this.node.x = this.giftFrameArray[mousesNum].x; 
            this.node.y =this.giftFrameArray[mousesNum].y;
            break;

            default:
            break;
        }
    }
    // update (dt) {},
});
